package com.Entity;

import com.alibaba.fastjson2.JSONObject;
import org.apache.kafka.common.serialization.Serializer;

import java.util.Map;

public class PersonSer implements Serializer<Person> {
    public void configure(Map<String, ?> configs , boolean isKey){

    }
    public byte[] serialize(String topic, Person data){
        String person = JSONObject.toJSONString(data);
        return person.getBytes();
    }

    @Override
    public void close() {

    }
}
